A portion of the disclosure of this patent document contains material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure as it appears in the Patent and Trademark Office patent file or records but otherwise reserves all copyright right whatsoever.
1. Technical Field
The present invention relates generally to Internet publishing technologies and, in particular, to techniques for dynamically serving web pages that include tables populated with dynamic data.
2. Description of the Related Art
Page serving technologies are evolving at a rapid pace. Since 1997, a number of major technologies have attempted to supplement, if not replace, dynamically generated HTML, i.e. database or CGI scripts used to generate a web page on the fly. These technologies are Sun Microsystems(trademark)""s Java(trademark) Server Page(trademark) (JSP), Microsoft(trademark)""s Active Server Page(trademark) (ASP), and the Extensible Style Sheet Language (XSL/XSLT) being promoted by the World Wide Web Consortium (W3C). Such techniques provide for the generation and serving of dynamic web page content by enabling a page creator to write HTML and then to embed pure programming logic inside the page markup. Sun""s JSP and Microsoft""s ASP are similar in that they both are essentially web templates that enable given code (e.g., code written in JAVA) to be embedded in static HTML to be served in response to a client browser request.
Although techniques such as JSP and ASP allow page authors to quickly and easily create web pages with dynamically-generated content, these techniques still have limitations. One limitation, in particular, is the inability to format an HTML table from given input data or that exhibits given customization, e.g., the capability to display highlighted cells based on given data conditions or the ability to format the table to facilitate rotation about any row or column. As is well-known, an HTML table consists of headers, rows and columns. A column represents a type of data. A header is used to display proper name for each column. A row is a set of data that consists of one datum from each column.
Thus, for example, generating an HTML table from dynamic data in a JAVA server page is a complicated task. To produce a formatted table, one must first obtain the data from given input object(s). The way to access the data is different depending on the implementation of those objects. One may implement their input as a JavaBean(trademark) that uses indexed properties or vanilla properties. Others may implement a series of data beans using a combination of indexed property and property. Additional ways of accessing data might be through an XML document object model (DOM) or a JDBC ResultSet. With all these variations, it is difficult to format an HTML table for a dynamically-generated page wherein input data objects may be retrieved from varying types of input data sources.
Once the dynamic data is obtained, it would also be desirable to format that data within the dynamic HTML table. One such type of formatting is highlighting. As is well-known, it is fairly simple to highlight a given column or row in a dynamically-generated HTML table, and it is also known to highlight a specific cell in a static HTML table. However, there is no known technique for highlighting a given cell in a dynamically-generated table when data in that cell satisfies a given condition. For example, for a bank online statement wherein the information returned to the requesting user is a table, it would be desirable to be able to highlight a given cell to indicate that the user""s checking account balance, for example, has fallen below a given amount. Thus, it would be desirable to be able to convert dynamic data (such as the result of a database query) into a formatted tabular representation in which certain table cells are conditionally highlighted based on the characteristics of the dynamic data to be presented in the cell.
Another type of table functionality that is currently unavailable in the art is the ability to produce a single dynamic page that will render a table correctly in any given horizontal or vertical orientation. There are many reasons for rotating a tabular representation in a web page. To give a simple example, some languages, such as Hebrew, are read right-to-left. As another example, assume a table compares the prices of vegetables for five different groceries. Because there are hundreds of vegetable types, the page author will want to be able to rotate the table so that it has five columns but hundreds of rows. When a table is rotated, however, the corresponding attributes in the table should change as well. If there are many attributes in the HTML table, however, there will be significant changes required when the orientation is altered. With a formatted table, a formatter for a column should become a formatter for a row. Implementing formatters for all of the expected orientations, however, is quite difficult.
For a JAVA programmer who is not an HTML expert, it is not easy to completely understand the behavior of the attributes in a table that is going to be rotated. In the example described above, this is because there are a large number of attributes associated with the HTML table. In the prior art, there is no means available to show the position and precedence of all of these attributes. Although the documentation generated from JAVA class files contains the HTML table attributes, such documentation does not show any of the relations among the attributes. Thus, for example, a developer has no simple way to determine the behaviors of given attributes or what rule should govern if a behavior conflict occurs.
The present invention addresses these and other deficiencies of the prior art.
The present invention describes a table formatter that is useful in formatting a markup language page table having dynamic data. The table formatter provides a number of useful functions including a raw data acquisition object that enables page developers to access different types of data objects for the table using a common interface, a technique to enable a page developer to specify how to convert dynamic data into a formatted representation in which certain table cells are conditionally highlighted, and a technique to enable the page author to format the table so that the contents of the table are independent of the table""s orientation. The table formatter is invoked to enable the page developer to set up properties that will be used to create the dynamic table in response to a client browser request for a page that includes the table. Upon receipt of that request at the server, a request object and a data object are passed into the table formatter to generate the table according to the properties and to populate the table from a data source defined by the raw data acquisition object. As noted above, the dynamically-generated table may include conditionally highlighted cells as well as a defined horizontal or vertical orientation. The page that includes this table is then returned to the requesting browser in the usual manner.
Thus, it is a primary object of the present invention to provide a table formatter that is useful at a server for writing a server page (e.g., using JSP) to produce a dynamic table.
It is still another object of the invention to provide a method to specify the formatting of a tabular presentation of data in which the formatting attributes associated with individual elements of the table are independent of the table""s orientation with respect to the table contents. This allows the orientation to be specified as an isolated aspect of the overall formatting specification that can be easily changed by the page author.
According to a preferred embodiment, a method is operative at a web server for generating an HTML table having dynamic data, wherein the table can be oriented in any horizontal or vertical orientation. The method preferably utilizes a table format page object to format the table. To facilitate selective rotation of the dynamic table, the method begins by associating together given attribute characteristics of each individual cell in the table. The page developer then sets a table style rotation property on the table format page object. In response to a client request, the table format page object is then instantiated with the dynamic data. The table style rotation property is applied to the table to control the table""s orientation. The resulting table is then served back to the requesting client browser.
The foregoing has outlined some of the more pertinent objects and features of the present invention. These objects should be construed to be merely illustrative of some of the more prominent features and applications of the invention. Many other beneficial results can be attained by applying the disclosed invention in a different manner or modifying the invention as will be described. Accordingly, other objects and a fuller understanding of the invention may be had by referring to the following Detailed Description of the Preferred Embodiment.